package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MyEquipmentMapper;
import com.ruoyi.system.domain.MyEquipment;
import com.ruoyi.system.service.IMyEquipmentService;

/**
 * 车间设备Service业务层处理
 *
 * @author ruoyi
 * @date 2023-12-18
 */
@Service
public class MyEquipmentServiceImpl implements IMyEquipmentService
{
    @Autowired
    private MyEquipmentMapper myEquipmentMapper;

    /**
     * 查询车间设备
     *
     * @param id 车间设备主键
     * @return 车间设备
     */
    @Override
    public MyEquipment selectMyEquipmentById(Long id)
    {
        return myEquipmentMapper.selectMyEquipmentById(id);
    }

    /**
     * 查询车间设备列表
     *
     * @param myEquipment 车间设备
     * @return 车间设备
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "u")
    public List<MyEquipment> selectMyEquipmentList(MyEquipment myEquipment)
    {
        return myEquipmentMapper.selectMyEquipmentList(myEquipment);
    }

    /**
     * 新增车间设备
     *
     * @param myEquipment 车间设备
     * @return 结果
     */
    @Override
    public int insertMyEquipment(MyEquipment myEquipment)
    {
        return myEquipmentMapper.insertMyEquipment(myEquipment);
    }

    /**
     * 修改车间设备
     *
     * @param myEquipment 车间设备
     * @return 结果
     */
    @Override
    public int updateMyEquipment(MyEquipment myEquipment)
    {
        return myEquipmentMapper.updateMyEquipment(myEquipment);
    }

    /**
     * 批量删除车间设备
     *
     * @param ids 需要删除的车间设备主键
     * @return 结果
     */
    @Override
    public int deleteMyEquipmentByIds(Long[] ids)
    {
        return myEquipmentMapper.deleteMyEquipmentByIds(ids);
    }

    /**
     * 删除车间设备信息
     *
     * @param id 车间设备主键
     * @return 结果
     */
    @Override
    public int deleteMyEquipmentById(Long id)
    {
        return myEquipmentMapper.deleteMyEquipmentById(id);
    }
}
